const map = {
	'el-radio-group': 'el-radio',
	'el-checkbox-group': 'el-checkbox',
	'el-select': 'el-option',
};
export function getChild(elName, h, options = []) {
	const arr = [];
	if (map[elName] !== undefined) {
		for (const i of options) {
			const label = elName === 'el-select' ? i.label : i.value;
			const value = elName === 'el-select' ? i.value : i.label;
			arr.push(
				h(
					`${map[elName]}`,
					{
						props: {
							label,
							value,
						},
					},
					[h('span', i.label)]
				)
			);
		}
	}
	return arr;
}
